package com.example.customview.scrollevent.more

import android.widget.ArrayAdapter
import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseDBFragment
import com.example.customview.R
import com.example.customview.arouter.CustomArouter
import com.example.customview.databinding.FragmentScrollMoreBinding

/**
 * listView+ScrollView 嵌套滑动
 */
@Route(path = CustomArouter.CUSTOM_SCROLLER_MORE_FRAGMENT)
class ScrollerMoreFragment : BaseDBFragment<FragmentScrollMoreBinding>(R.layout.fragment_scroll_more) {

    private val datas by lazy {
        listOf("Apple", "Banana", "Orange", "Watermelon",
            "Apple", "Banana", "Orange", "Watermelon",
            "Pear","Grape", "Pineapple", "Strawberry", "Cherry", "Mango")
    }
    override fun initView() {
      val adapter =  ArrayAdapter(requireContext(), android.R.layout.simple_list_item_1, datas);

        mBinding.listView.adapter = adapter;
    }
}